cmake_minimum_required(VERSION 3.5.0)
project(stb_project)

set(CMAKE_CXX_STANDARD 17)

file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
file(GLOB SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")

# add_executable(main main.cpp )
add_library(stb ${SRC_FILES})

if(WIN32)
set(DEP_PATH d://dependency)
endif()


if(UNIX)
set(DEP_PATH /usr/local)
endif()

set(CMAKE_INSTALL_INCLUDEDIR ${DEP_PATH})
set(CMAKE_INSTALL_LIBDIR ${DEP_PATH}/lib)

install(TARGETS stb
        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

# install(DIRECTORY include
        # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/include/stb)

